<script setup>
import { provide, ref, nextTick } from 'vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'

const isRouteActive = ref(true)

provide('reload', () => {
  isRouteActive.value = false
  nextTick(() => {
    isRouteActive.value = true
  })
})
</script>

<template>
  <a-config-provider :locale="zhCN" componentSize="middle">
    <router-view v-if="isRouteActive"/>
  </a-config-provider>
</template>
